<template>
	<view class="uni-padding-wrap uni-common-mt" style="margin-left: 5px;margin-right: 5px;margin-top: 10px;background-color: #F4F4F4;">
			<button type="warn" @click="logout()">退出登陆</button>
	</view>

</template>
	
<script>
	export default{
		data(){
			return{
				
			}
		},
		methods:{
			logout(){
			
				
				// uni.removeStorageSync("token")
				// uni.removeStorageSync("username")
				// uni.removeStorageSync("iconpath")
				// uni.removeStorageSync("nicheng")
				// uni.removeStorageSync("phone")
				uni.clearStorageSync()
				
				
				
				var lastpage=getCurrentPages().length-2
			
				uni.navigateBack({
					delta:lastpage
				});
				uni.showToast({
					title:"退出成功",
					duration: 2000
				});
				lastpage.display="display:block;"
				
			}
		}
	}
</script>

<style scoped>
	
	
</style>
